package com.egao.common.manage.school;

import com.egao.common.core.web.BaseController;
import com.egao.common.core.web.JsonResult;
import com.egao.common.module.counsel.service.CounselStudentFeedbackService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author lym
 * @date 2022/2/18 15:50
 */
@Api(tags = "预约咨询统计管理")
@RestController
@RequestMapping("${api}")
public class SchoolCounselStatisticsController extends BaseController {

    @Autowired
    private CounselStudentFeedbackService counselStudentFeedbackService;

    @PreAuthorize("hasAuthority('school:counsel:manage')")
    @ApiOperation(value = "咨询反馈统计")
    @GetMapping("/school/counsel/statistics/feedback")
    public JsonResult feedback(String startDate, String endDate) {
        return counselStudentFeedbackService.feedbackStatistics(startDate, endDate);
    }
}
